<script setup lang="ts">
import {ref} from 'vue'
import {FormRules} from 'naive-ui'


const size = ref<'small' | 'medium' | 'large'>('medium');
const model = ref({
  name: '',
});
const rules = ref<FormRules>({});

function setData(d: Api.Entity.Template) {
  model.value.name = d.name;
}

defineExpose({
  setData
});
</script>

<template>
  <n-form
    ref="formRef"
    :model="model"
    :rules="rules"
    label-placement="left"
    label-width="auto"
    require-mark-placement="right-hanging"
    :size="size"
    :style="{
      maxWidth: '640px'
    }"
  >
    <n-form-item label="模板名称" path="name">
      <n-input v-model:value="model.name" placeholder="" style="text-align: left"/>
    </n-form-item>
  </n-form>
</template>

<style scoped>

</style>
